Is Compare-and-Swap Really Necessary?

نویسندگان

  • Pankaj Khanchandani
  • Roger Wattenhofer
چکیده

The consensus number of a synchronization primitive, such as compare-and-swap or fetch-and-add, is the maximum number of processes n among which binary consensus can be solved by using read-write registers and registers supporting the synchronization primitive. As per Herlihy’s seminal result, any synchronization primitive with consensus number n can be used to construct a wait-free and linearizable implementation of any non-trivial concurrent object or a data structure that is shared among n processes. As the compare-and-swap primitive has infinite consensus number and is widely supported by multi-processors, synchronization tasks have been typically solved using the compare-and-swap synchronization primitive. In this paper, we show that having compare-and-swap as the quintessential synchronization primitive for solving wait-free synchronization is not necessary. It is not necessary as we give an O(1) time wait-free and linearizable implementation of a compare-and-swap register for processes 1, 2, . . . , n using registers that support the two weak synchronization primitives half-max and max-write, each with consensus number one. Thus, any algorithm that uses powerful compare-and-swap registers to solve some arbitrary synchronization problem among processes 1, 2, . . . , n can be transformed into an algorithm that has the same asymptotic time complexity and only uses weak consensus number one primitives. ar X iv :1 80 2. 03 84 4v 1 [ cs .D S] 1 2 Fe b 20 18

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Optimal two-qubit quantum circuits using exchange interactions

We give the optimal decomposition of a universal two-qubit circuit using Heisenberg exchange interactions and single qubit rotations. Tuning the strength and duration of the Heisenberg exchange allows one to implement SWAP gates. Our optimal circuit is constructed from only three SWAP gates and six single qubit gates. We show that three SWAP gates are not only sufficient, but necessary. Since s...

متن کامل

Optimal Time-Space Tradeoff for Shared Memory Leader Election

Though it is common practice to treat synchronization primitives for multiprocessors as abstract data types, they are in reality machine instructions on registers. A crucial theoretical question with practical implications is the relationship between the size of the register and its computational power. We wish to study this question and choose as a rst target the popular compare&swap operation...

متن کامل

Transparent Support for Wait-Free Transactions

This paper concerns software support for non-blocking transactions in shared-memory multiprocessors. We present mechanisms that convert sequential transactions into lock-free or wait-free ones. In contrast to some previous mechanisms, ours support transactions for which the set of memory locations accessed cannot be determined in advance. Our implementations automatically detect and resolve con...

متن کامل

Synchronization power depends on the register size (

Though it is common practice to treat synchronization primitives for multiprocessors as abstract data types, they are in reality machine instructions on registers. A crucial theoretical question with practical implications is the relationship between the size of the register and its computational power. We wish to study this question and choose as a rst target the popular compare&swap operation...

متن کامل

Synchronization power depends on the register size (Preliminary Version)

Though it is common practice to treat synchronization primitives for multiprocessors as abstract data types, they are in reality machine instructions on registers. A crucial theoretical question with practical implications is the relationship between the size of the register and its computational power. We wish to study this question and choose as a first target the popular compare&swap operati...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • CoRR

دوره abs/1802.03844  شماره 

صفحات  -

تاریخ انتشار 2018